﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace D2DEngine.Tile
{
    public class D2DMonsterLayer
    {        
        int[,] layout;

        /// <summary>
        /// The layout of the layer.
        /// </summary>
        public int[,] Layout
        {
            get { return this.layout; }
            set { this.layout = value; }
        }


        /// <summary>
        /// An integer representing the number
        /// of cell in one row of the layer.
        /// </summary>
        public int Width
        {
            get { return layout.GetLength(1); }
        }

        /// <summary>
        /// An integer representing the number
        /// of cell in one column of the layer.
        /// </summary>
        public int Height
        {
            get { return layout.GetLength(0); }
        }        

        public D2DMonsterLayer(int width, int height)
        {
            layout = new int[height, width];
        }


        /// <summary>
        /// Sets an index to the cell corresponding
        /// to the x,y value given in parameters
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="index"></param>
        public void SetCellIndex(int x, int y, int index)
        {
            this.layout[y, x] = index;
        }
    }
}
